SUBROUTINE cross_ab(x,y,z)
! Copyright (C) 2009 W. Wang
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.
IMPLICIT NONE
! z=(x)X(y)
REAL(8), INTENT(IN) :: x(3)
REAL(8), INTENT(IN) :: y(3)
REAL(8), INTENT(OUT) :: z(3)
z(1)=x(2)*y(3)-x(3)*y(2)
z(2)=x(3)*y(1)-x(1)*y(3)
z(3)=x(1)*y(2)-x(2)*y(1)
RETURN
END SUBROUTINE

